package com.realtyManage.springboot.Controller;

import com.alibaba.fastjson.JSON;
import com.realtyManage.springboot.Config.MyLog;
import com.realtyManage.springboot.Config.WxProgramPayConfig;
import com.realtyManage.springboot.Model.Do.CustomerRegistration;
import com.realtyManage.springboot.Model.Do.SpecialOfferHouse;
import com.realtyManage.springboot.Model.Vo.CustomReEntity;
import com.realtyManage.springboot.Model.Vo.RechargeVo;
import com.realtyManage.springboot.Model.Vo.UserEntity;
import com.realtyManage.springboot.Service.ICustomerRegistrationService;
import com.realtyManage.springboot.Service.ISpecialOfferHouseService;
import com.realtyManage.springboot.Utils.AppletPayUtil;
import com.realtyManage.springboot.wxpay.PayUtil;
import com.realtyManage.springboot.wxpay.WXPayUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;

/**
 * 杭州素色网络科技有限公司
 * 2019.09.06
 * 小程序管理
 */

@Controller
@ResponseBody
@RequestMapping("/xcx")
public class SmallProceduresManageController {

    @Autowired
    StringRedisTemplate template;

    @Autowired
    private ISpecialOfferHouseService specialOfferHouseService;

    @Autowired
    private ICustomerRegistrationService customerRegistrationService;

    /**
     * 成功的标识
     */
    private final static String SUCCESS="SUCCESS";

    /**
     * 返回状态码的变量名
     *
     */
    private final static String RETURN_CODE="RETURN_CODE";

    /**
     * 客户来访信息
     * @param entity
     * @param request
     * @return
     */
    @MyLog(value = "查询来访列表")
    @RequestMapping(value = "/showFirstVisit")
    private String showFirstVisit(CustomReEntity entity, HttpServletRequest request) {
        Page<CustomerRegistration> houseDetailList = customerRegistrationService.findPagedByWhereClause(entity);
        return JSON.toJSONString(houseDetailList);
    }



}
